package com.hspedu.exception_;

public class NumberFormatException {
    public static void main(String[] args) {
        String name = "刘金涛帅哥";
        //将 String 转成 int
        int num = Integer.parseInt(name);//NumberFormatException
        System.out.println("num=" + num);
    }
}

